<template>
      <el-form ref="form" :model="form" :rules="rules" size="small" label-width="80px">
                <el-form-item label="数量" prop="quantity">
                    <el-input v-model="form.quantity" style="width: 370px;" />
                </el-form-item>
                <el-form-item label="单位" prop="unit">
                    <el-input v-model="form.unit" style="width: 370px;" />
                </el-form-item>
                <el-form-item label="备注">
                    <el-input v-model="form.remark" style="width: 370px;" />
                </el-form-item>
                <el-form-item label="产品编码" prop="productCode">
                    <el-input v-model="form.productCode" style="width: 370px;" />
                </el-form-item>
                <el-form-item label="产品名称">
                    <el-input v-model="form.productName" style="width: 370px;" />
                </el-form-item>
                <el-form-item label="产品规格">
                    <el-input v-model="form.productSpecification" style="width: 370px;" />
                </el-form-item>
        </el-form>
</template>
<script>
import { form } from '@crud_my/crud'
const components = {}

export default {
  mixins: [form()],
  data() {
    return {
      form: this.crud.form,
      rules: {
        quantity: [
          { required: true, message: '数量不能为空', trigger: 'blur' }
        ],
        unit: [
          { required: true, message: '单位不能为空', trigger: 'blur' }
        ],
        productCode: [
          { required: true, message: '产品编码不能为空', trigger: 'blur' }
        ]
      }
    }
  }
}
</script>
